﻿<form class="easyui-form form_label_140"
      data-options="
        novalidate:true,
        onLoadSuccess:function(data) {
            console.log('form.loadSuccess.data', data);
            var form = $(this);
            require(['jquery', 'artTemplate'], function ($, artTemplate) {
                var tempalte = form.find('script.OperableStoresSelectedRegion_Node');
                var html = $(artTemplate.render(tempalte.html(), {
                    dataSources: data.storesDataSource,
                }));
                html.click(function() {
                    var index = Number($(this).attr('data-index'));
                    data.callback(index);
                });
                form.find('.OperableStoresSelectedRegion').append(html);
            });
        }">
    <div class="OperableStoresSelectedRegion"></div>
    <script class="OperableStoresSelectedRegion_Node" type="text/html">
        {{ each dataSources node index}}
        <div class="box feature_module hover" data-index="{{ index }}">
            <div class="title">
                <span class="span">{{ node.Name }}</span>
            </div>
            <div class="description">
                <span class="span">{{ node.DescriptionRemarks }}</span>
            </div>
        </div>
        {{ /each }}
    </script>
</form>
